@extends('layouts.console_header')

@section('title', '充值明细')

@section('resources')
    @parent

@endsection

@section('content')
<!--  html内容  -->
<section class="user_list">
	<div style="border-bottom: 2px solid #9955c6;overflow: hidden;">
		<p class="fz_14 account_title fl" style="border: none;">
		    <span style="color: #7f7f7f;">
		        <a href="/console/index">首页</a>>财务中心>
		        <a href="/console/finance/user/statement?cityid={{$cityid}}">用户对账单</a>>
            </span>
		    <span class="co_violet">充值明细</span>
        </p>
		<a onclick="history.go(-1);" href="#"><p class="fr tc back_btn">返回</p></a>
		<a href="#" onclick="export_data()"><p class="fr tc back_btn">导出</p></a>
	</div>
	<div style="border-bottom: 2px solid #9955c6;overflow: hidden;">
	    <span class="fz_14 account_title fl" style="border: none;">
	        昵称：{{$userinfo['nickname']}}  &nbsp;&nbsp;
	        帐号：{{$userinfo['mobile']}}
	    </span>
	    <span></span>
	</div>
	<table class="finance_top_list">
		<tr>
			<th>充值笔数</th>
			<th>消费笔数</th>
			<th>充值金额(元)</th>
			<th>实付金额</th>
			<th>可用余额</th>
		</tr>
		<tr>
			<td>{{$rechargenum}}</td>
			<td>{{$rechargemoney}}</td>
			<td>{{$isdouble}}</td>
			<td>{{$notdouble}}</td>
			<td>{{$userinfo['balance']}}</td>
		</tr>
	</table>
	<table id="example" class="display" cellspacing="0" width="100%">
        <thead>
            <tr>
                <th>序号</th>
                <th>充值单号</th>
                <th>充值方式</th>
                <th>充值金额(元)</th>
                <th>到账金额</th>
                <th>到账状态</th>
                <th>翻倍券</th>
                <th>朋友圈</th>
                <th>充值时间</th>
                <th>实际到账时间</th>
            </tr>
        </thead>
        <tfoot>
            <tr>
                <th>序号</th>
                <th>充值单号</th>
                <th>充值方式</th>
                <th>充值金额(元)</th>
                <th>到账金额</th>
                <th>到账状态</th>
                <th>翻倍券</th>
                <th>朋友圈</th>
                <th>充值时间</th>
                <th>实际到账时间</th>
            </tr>
        </tfoot>
        <tbody>
        @foreach($data as $list)
            <tr>
            @if(!isset($i))
                <td>{{$i=1}}</td>
            @else
                <td>{{++$i}}</td>
            @endif
                <td>{{$list['rechargenumber']}}</td>
                <td>{{$list['path']}}</td>
                <td>{{$list['money']}}</td>
                <td>{{$list['doublemoney']}}</td>
            @if($list['doublestatus'] == '1')
                <td>已到账</td>
            @else
                <td>未到账</td>
            @endif
            @if($list['isdoublecoupons'] == '1')
                <td>使用</td>
            @else
                <td>未使用</td>
            @endif
            @if($list['sharestatus'] == '1')
                <td>已分享</td>
            @else
                <td>未分享</td>
            @endif
                <td>{{date('Y-m-d H:i:s', strtotime($list['created_at']))}}</td>
                <td>{{date('Y-m-d H:i:s', strtotime($list['doubletime']))}}</td>
            </tr>
        @endforeach
        </tbody>
    </table>
</section>
@endsection

@section('scriptResources')
    @parent
    <script>
    function export_data() {
        alert("正在开发");
    }
    </script>
@endsection